#ifndef BIBLIO_ALLEGRO_H
#define BIBLIO_ALLEGRO_H

#include "projet.h"

typedef struct sprite
        {
               BITMAP *bmp;
               int x;
               int y;
               float angle;
        } SPRITE;

typedef struct rectangle
        {
               int x1,y1,x2,y2;
        } ZONE_RECT;

typedef struct images_data
        {
               SPRITE **sp_av;
               BITMAP *buffer;
               BITMAP *carte;
               BITMAP *souris;
               BITMAP *aeroport;
               BITMAP *nuage;
               BITMAP *canard;
               BITMAP *explosion;
               
               BITMAP *image_aero[7];
               
               ZONE_RECT *zone_r;
               
               int cpt;

        } IM_DAT;





int main_allegro(void);
void init();
void deinit(IM_DAT **im_dat);

void init_sprite(IM_DAT **im_dat);
void *annimation_allegro(void *);
void *annim_alleg (void *d);
void dessin_info_aero(int x,int y, t_aeroport *ar, int etat, IM_DAT*im_dat);
int rect_detect(ZONE_RECT r);
void dessin_info_avion(int x, int y, t_avion *av, IM_DAT*im_dat);
void dessin_info_im_aero(int x, int y, t_aeroport *ar, IM_DAT*im_dat);
void dessin_nom_aero(int x, int y, t_aeroport *ar, IM_DAT *im_dat);
float   calcul_angle (t_avion *av);
void dessin_carte(IM_DAT *im_dat);

#endif
